package com.party.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 设备管理
 * </p>
 *
 * @author ccl
 * @since 2024-10-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="PbDevice对象", description="设备管理")
public class PbDevice extends Model<PbDevice> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "设备编码")
    private String deviceCode;

    @NotEmpty(message = "设备名称不能为空")
    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "所属用户")
    private Long belongUser;

    @ApiModelProperty(value = "状态 0 下线 1 上线")
    private Integer status;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "类型")
    private Integer type;

    @ApiModelProperty(value = "操作人id")
    private String operatorId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "电台id集合")
    private List<Long> stationIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "资源id集合")
    private List<Long> resourceIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "党建风采id集合")
    private List<Long> elegantIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "海报id集合")
    private List<Long> posterIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "主题日志id集合")
    private List<Long> themeIds;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
